<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8" isELIgnored="false" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title></title>
</head>
<body>
<div>
    <h4>欢迎${sessionScope.user}进入后台主页<a href="${pageContext.request.contextPath}/doReg4.action" onclick="back()">注销</a></h4>
</div>

</body>
<script>
    history.pushState(null, null, document.URL);
    window.addEventListener('popstate', function () {
        history.pushState(null, null, document.URL);
    });
    function back() {
        var result=window.confirm("确认退出系统吗？");
        if(result){
            location.href="${pageContext.request.contextPath}/doReg4.action";
        }
    }

</script>
<%

    Object count=application.getAttribute("count");
    if(count==null){
        application.setAttribute("count",1);
    }else{
        Integer i=(Integer)count;
        application.setAttribute("count",i+1);
    }
    Integer icount=(Integer)application.getAttribute("count");
    out.println("您是第"+icount+"位访客");
%>
</html>
